package org.exhaust.barbecue.test.service;

import org.exhaust.barbecue.annotation.Manager;
import org.exhaust.barbecue.annotation.Processor;
import org.exhaust.barbecue.test.action.AddUserCacheAction;
import org.exhaust.barbecue.test.action.AddUserDBHandleAction;
import org.exhaust.barbecue.test.action.AddUserPrepareAction;
import org.exhaust.barbecue.test.action.AddUserValidateAction;
import org.exhaust.barbecue.test.facade.UserFacade;
import org.exhaust.barbecue.test.model.AddUserRequest;
import org.exhaust.barbecue.test.model.AddUserResponse;

@Manager
public interface UserService extends UserFacade {

    /**
     * 添加用户
     *
     * @param request
     * @return
     */
    @Processor(
            validate = {
                    AddUserValidateAction.class
            },
            prepare = {
                    AddUserPrepareAction.class
            },
            service = {
                    AddUserDBHandleAction.class, AddUserCacheAction.class
            },
            post = {

            }
    )
    AddUserResponse addUser(AddUserRequest request);

}
